<script setup>
  import { ref } from 'vue'

  const jokeSet = ref('')
  const getJoke = async () => {
    const res = await uni.request({
      url: 'https://api-vue-base.itheima.net/api/joke',
      method: 'GET',
    })
    // console.log(res)
    jokeSet.value = res.data
  }
</script>
<template>
  <view>
    <button @tap="getJoke">点击获取笑话</button>
    <text>{{ jokeSet }}</text>
  </view>
</template>

<style></style>
